#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "kiana";

# 将项目根目录添加到 sys.path，解决 cmd 下执行该模块找不到包的问题
import sys, os;
current_path = os.path.abspath(os.path.dirname(__file__));
separator = "\\" if os.name == "nt" else "/";
project_name = "whgc" + separator;
root_path = current_path[:current_path.find(project_name) + len(project_name)];  # 获取项目根目录
sys.path.append(root_path);

from spider.dcb_spider import *;
from spider.dcb_spider_02 import *;
from data_process.dcb_data_process import *;

'''
双色球数据爬取应用入口
'''
def spider_application(page_count=300):
    # url = "http://538b537e25.zicp.vip:13595/api/economy/bicolorSpheres";
    # all_data = get_all_data(url, page_count);
    all_data = get_dcb_page_list_data(page_count);
    dcb_storage(all_data);

if __name__ == '__main__':
    spider_application(5);